#ifndef SAVEAIRWV_H
#define SAVEAIRWV_H

#include <QObject>
#include <QtEndian>

#include "savebase.h"

/***
 *空中中波红外
 * 640 * 512
 * fps: 2
 * */

// 空中帧数据结构
struct AirFrameData {
    quint32 frameNumber;          // 照片帧号
    QMap<quint32, QByteArray> slices;  // 存储切片数据，key为切片号
};

class SaveAirWV : public SaveBase
{
    Q_OBJECT
public:
    explicit SaveAirWV(QObject *parent = nullptr);

    bool saveRawImage(const QByteArray &imageData);

public slots:
    void onWorking(const QString ip, const quint16 port, const QByteArray arr);

    void onInitTimer()override{}     //初始化定时器, 本类不需要该函数

private:
    QMap<quint32, AirFrameData> m_airFrameMap;

    quint16 m_totalSlices = 512;

    AirFrameData m_frame;

signals:

};

#endif // SAVEAIRWV_H
